package com.save.rpgsavedecode.util;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class ConstantsMap {

    private Map<String, String> map;

    public ConstantsMap() {
        map = new HashMap<>();
    }

    public String setEntry(String key, String value) {
        return map.put(key, value);
    }

    public String getValue(String key) {
        String s = map.get(key);
        if (s != null && !s.isEmpty()) {
            return s;
        } else {
            return "";
        }
    }
}
